{% extends "vmbase.html" %}
{% block title %}OVIM - VM LIST{% endblock %}

{% block navbar %}
<a class="navbar" href="/ovim/"> >> VMHost List</a>
<a class="navbar" href="/ovim/{{ vmHost.id }}"> >> {{ vmHost.name }}</a>
<a class="navbar" href="/ovim/{{ vmHost.id }}/listvms/"> >> VM List	</a>
{% endblock %}

{% block action %}
<div class="action">
	<h3>ACTIONS</h3>
	<div id="actionmenu">
		<ul>
			<li>
				<a href="addvm/" title="Add a new VM to to {{ object.name }}.">
					<img src="/ovim/media/img/list-add.png"/>
					New VM
				</a>
			</li>	
		</ul>
	</div>
</div>
{% endblock %}


{% block content %}
	{% if vms %}
		{% for item in vms %}
			<div class="ovim_content">
				<h3>VMWare VM</h3>
				<div class="ovim_content_box">
					<img src="/ovim/media/img/computer.png" class="image" alt="Big Image" />
					<h2>{{ item.name }}</h2>
					<p class="ovim_content_box_comment">
						<img src="/ovim/media/img/Gravatar_30.gif" alt="" width="30" height="30" />
						{% if item.comments %}
							{{ item.comments }}
						{% else %}
							No Comment
						{% endif %}
						<br><br>
					</p>
					<div class="content_action"><img src="/ovim/media/img/edit-find-replace.png" /><a href="{{ item.id }}/">Edit</a></div>
		    		<div class="content_action"> <img src="/ovim/media/img/edit-clear.png" /><a href="{{ item.id }}/delete/">Delete VMHost</a></div>
		    	</div>
			</div>
		{% endfor %}
	{% else %}
		<div class="ovim_content">
			<h3>No VM had been set up yet.</h3>
		</div>
	{% endif %}
{% endblock %}